//2.4 - The Weapon Store Game - Dirk Henkemans // and Mark Lee - Prima Tech #include #include using namespace std; //contains the code for the weapon store game. int main (void) { string name ; cout << "Welcome to the weapon store, noble knight." << " Come to equip the army again?" <> name; cout << "Well then, Sir " << name.c_str() << ", Let's get shopping!" << endl; float gold = 50; int silver = 8; const float SILVERPERGOLD = 6.7; const float BROADSWORDCOST = 3.6; unsigned short broadswords; cout << "You have " << gold << " gold pieces and " << silver <<" silver." <> broadswords; gold = gold - broadswords * BROADSWORDCOST; cout << "\nThank you. You have " << gold << " left."; silver = (gold - (int)gold) * SILVERPERGOLD; gold = (int)(gold); cout << "That is equal to " << gold << " gold and " << silver << " silver. " << endl << "Thank you for shopping at the Weapon Store. " << "Have a nice day, Sir " << name.c_str(); return 0; }